
$(function () {
    map();
    function map() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('map_1'));

// 数据需获取
// var data = [
//      {name: '海门', value: 69},
//      {name: '鄂尔多斯', value: 12},
//      {name: '招远', value: 12},
//      {name: '舟山', value: 12},
//      {name: '齐齐哈尔', value: 14},
//      {name: '盐城', value: 15},
//      {name: '赤峰', value: 16},
//      {name: '青岛', value: 18},
//      {name: '乳山', value: 18},
//      {name: '金昌', value: 19},
//      {name: '泉州', value: 21},
//      {name: '莱西', value: 21},
//      {name: '日照', value: 21},
//      {name: '胶南', value: 22},
//      {name: '南通', value: 23},
//      {name: '拉萨', value: 24},
//      {name: '云浮', value: 24},
//      {name: '梅州', value: 25},
//      {name: '文登', value: 25},
//      {name: '上海', value: 25},
//      {name: '攀枝花', value: 25},
//      {name: '威海', value: 25},
//      {name: '承德', value: 25},
//      {name: '厦门', value: 26},
//      {name: '汕尾', value: 26},
//      {name: '潮州', value: 26},
//      {name: '丹东', value: 27},
//      {name: '太仓', value: 27},
//      {name: '曲靖', value: 27},
//      {name: '烟台', value: 28},
//      {name: '福州', value: 29},
//      {name: '瓦房店', value: 30},
//      {name: '即墨', value: 30},
//      {name: '抚顺', value: 31},
//      {name: '玉溪', value: 31},
//      {name: '张家口', value: 31},
//      {name: '阳泉', value: 31},
//      {name: '莱州', value: 32},
//      {name: '湖州', value: 32},
//      {name: '汕头', value: 32},
//      {name: '昆山', value: 33},
//      {name: '宁波', value: 33},
//      {name: '湛江', value: 33},
//      {name: '揭阳', value: 34},
//      {name: '荣成', value: 34},
//      {name: '连云港', value: 35},
//      {name: '葫芦岛', value: 35},
//      {name: '常熟', value: 36},
//      {name: '东莞', value: 36},
//      {name: '河源', value: 36},
//      {name: '淮安', value: 36},
//      {name: '泰州', value: 36},
//      {name: '南宁', value: 37},
//      {name: '营口', value: 37},
//      {name: '惠州', value: 37},
//      {name: '江阴', value: 37},
//      {name: '蓬莱', value: 37},
//      {name: '韶关', value: 38},
//      {name: '嘉峪关', value: 38},
//      {name: '广州', value: 38},
//      {name: '延安', value: 38},
//      {name: '太原', value: 39},
//      {name: '清远', value: 39},
//      {name: '中山', value: 39},
//      {name: '昆明', value: 39},
//      {name: '寿光', value: 40},
//      {name: '盘锦', value: 40},
//      {name: '长治', value: 41},
//      {name: '深圳', value: 41},
//      {name: '珠海', value: 42},
//      {name: '宿迁', value: 43},
//      {name: '咸阳', value: 43},
//      {name: '铜川', value: 44},
//      {name: '平度', value: 44},
//      {name: '佛山', value: 44},
//      {name: '海口', value: 44},
//      {name: '江门', value: 45},
//      {name: '章丘', value: 45},
//      {name: '肇庆', value: 46},
//      {name: '大连', value: 47},
//      {name: '临汾', value: 47},
//      {name: '吴江', value: 47},
//      {name: '石嘴山', value: 49},
//      {name: '沈阳', value: 50},
//      {name: '苏州', value: 50},
//      {name: '茂名', value: 50},
//      {name: '嘉兴', value: 51},
//      {name: '长春', value: 51},
//      {name: '胶州', value: 52},
//      {name: '银川', value: 52},
//      {name: '张家港', value: 52},
//      {name: '三门峡', value: 53},
//      {name: '锦州', value: 54},
//      {name: '南昌', value: 54},
//      {name: '柳州', value: 54},
//      {name: '三亚', value: 54},
//      {name: '自贡', value: 56},
//      {name: '吉林', value: 56},
//      {name: '阳江', value: 57},
//      {name: '泸州', value: 57},
//      {name: '西宁', value: 57},
//      {name: '宜宾', value: 58},
//      {name: '呼和浩特', value: 58},
//      {name: '成都', value: 58},
//      {name: '大同', value: 58},
//      {name: '镇江', value: 59},
//      {name: '桂林', value: 59},
//      {name: '张家界', value: 59},
//      {name: '宜兴', value: 59},
//      {name: '北海', value: 60},
//      {name: '西安', value: 61},
//      {name: '金坛', value: 62},
//      {name: '东营', value: 62},
//      {name: '牡丹江', value: 63},
//      {name: '遵义', value: 63},
//      {name: '绍兴', value: 63},
//      {name: '扬州', value: 64},
//      {name: '常州', value: 64},
//      {name: '潍坊', value: 65},
//      {name: '重庆', value: 66},
//      {name: '台州', value: 67},
//      {name: '南京', value: 67},
//      {name: '滨州', value: 70},
//      {name: '贵阳', value: 71},
//      {name: '无锡', value: 71},
//      {name: '本溪', value: 71},
//      {name: '克拉玛依', value: 72},
//      {name: '渭南', value: 72},
//      {name: '马鞍山', value: 72},
//      {name: '宝鸡', value: 72},
//      {name: '焦作', value: 75},
//      {name: '句容', value: 75},
//      {name: '北京', value: 79},
//      {name: '徐州', value: 79},
//      {name: '衡水', value: 80},
//      {name: '包头', value: 80},
//      {name: '绵阳', value: 80},
//      {name: '乌鲁木齐', value: 84},
//      {name: '枣庄', value: 84},
//      {name: '杭州', value: 84},
//      {name: '淄博', value: 85},
//      {name: '鞍山', value: 86},
//      {name: '溧阳', value: 86},
//      {name: '库尔勒', value: 86},
//      {name: '安阳', value: 90},
//      {name: '开封', value: 90},
//      {name: '济南', value: 92},
//      {name: '德阳', value: 93},
//      {name: '温州', value: 95},
//      {name: '九江', value: 96},
//      {name: '邯郸', value: 98},
//      {name: '临安', value: 99},
//      {name: '兰州', value: 99},
//      {name: '沧州', value: 100},
//      {name: '临沂', value: 103},
//      {name: '南充', value: 104},
//      {name: '天津', value: 105},
//      {name: '富阳', value: 106},
//      {name: '泰安', value: 112},
//      {name: '诸暨', value: 112},
//      {name: '郑州', value: 313},
//      {name: '哈尔滨', value: 114},
//      {name: '聊城', value: 116},
//      {name: '芜湖', value: 117},
//      {name: '唐山', value: 119},
//      {name: '平顶山', value: 119},
//      {name: '邢台', value: 119},
//      {name: '德州', value: 120},
//      {name: '济宁', value: 120},
//      {name: '荆州', value: 127},
//      {name: '宜昌', value: 130},
//      {name: '义乌', value: 132},
//      {name: '丽水', value: 133},
//      {name: '洛阳', value: 134},
//      {name: '秦皇岛', value: 136},
//      {name: '株洲', value: 143},
//      {name: '石家庄', value: 147},
//      {name: '莱芜', value: 148},
//      {name: '常德', value: 152},
//      {name: '保定', value: 153},
//      {name: '湘潭', value: 154},
//      {name: '金华', value: 157},
//      {name: '岳阳', value: 169},
//      {name: '长沙', value: 175},
//      {name: '衢州', value: 177},
//      {name: '廊坊', value: 193},
//      {name: '菏泽', value: 194},
//      {name: '合肥', value: 229},
//      {name: '武汉', value: 273},
//      {name: '大庆', value: 279}
// ];
// var geoCoordMap = {
//     '海门':[121.15,31.89],
//     '鄂尔多斯':[109.781327,39.608266],
//     '招远':[120.38,37.35],
//     '舟山':[122.207216,29.985295],
//     '齐齐哈尔':[123.97,47.33],
//     '盐城':[120.13,33.38],
//     '赤峰':[118.87,42.28],
//     '青岛':[120.33,36.07],
//     '乳山':[121.52,36.89],
//     '金昌':[102.188043,38.520089],
//     '泉州':[118.58,24.93],
//     '莱西':[120.53,36.86],
//     '日照':[119.46,35.42],
//     '胶南':[119.97,35.88],
//     '南通':[121.05,32.08],
//     '拉萨':[91.11,29.97],
//     '云浮':[112.02,22.93],
//     '梅州':[116.1,24.55],
//     '文登':[122.05,37.2],
//     '上海':[121.48,31.22],
//     '攀枝花':[101.718637,26.582347],
//     '威海':[122.1,37.5],
//     '承德':[117.93,40.97],
//     '厦门':[118.1,24.46],
//     '汕尾':[115.375279,22.786211],
//     '潮州':[116.63,23.68],
//     '丹东':[124.37,40.13],
//     '太仓':[121.1,31.45],
//     '曲靖':[103.79,25.51],
//     '烟台':[121.39,37.52],
//     '福州':[119.3,26.08],
//     '瓦房店':[121.979603,39.627114],
//     '即墨':[120.45,36.38],
//     '抚顺':[123.97,41.97],
//     '玉溪':[102.52,24.35],
//     '张家口':[114.87,40.82],
//     '阳泉':[113.57,37.85],
//     '莱州':[119.942327,37.177017],
//     '湖州':[120.1,30.86],
//     '汕头':[116.69,23.39],
//     '昆山':[120.95,31.39],
//     '宁波':[121.56,29.86],
//     '湛江':[110.359377,21.270708],
//     '揭阳':[116.35,23.55],
//     '荣成':[122.41,37.16],
//     '连云港':[119.16,34.59],
//     '葫芦岛':[120.836932,40.711052],
//     '常熟':[120.74,31.64],
//     '东莞':[113.75,23.04],
//     '河源':[114.68,23.73],
//     '淮安':[119.15,33.5],
//     '泰州':[119.9,32.49],
//     '南宁':[108.33,22.84],
//     '营口':[122.18,40.65],
//     '惠州':[114.4,23.09],
//     '江阴':[120.26,31.91],
//     '蓬莱':[120.75,37.8],
//     '韶关':[113.62,24.84],
//     '嘉峪关':[98.289152,39.77313],
//     '广州':[113.23,23.16],
//     '延安':[109.47,36.6],
//     '太原':[112.53,37.87],
//     '清远':[113.01,23.7],
//     '中山':[113.38,22.52],
//     '昆明':[102.73,25.04],
//     '寿光':[118.73,36.86],
//     '盘锦':[122.070714,41.119997],
//     '长治':[113.08,36.18],
//     '深圳':[114.07,22.62],
//     '珠海':[113.52,22.3],
//     '宿迁':[118.3,33.96],
//     '咸阳':[108.72,34.36],
//     '铜川':[109.11,35.09],
//     '平度':[119.97,36.77],
//     '佛山':[113.11,23.05],
//     '海口':[110.35,20.02],
//     '江门':[113.06,22.61],
//     '章丘':[117.53,36.72],
//     '肇庆':[112.44,23.05],
//     '大连':[121.62,38.92],
//     '临汾':[111.5,36.08],
//     '吴江':[120.63,31.16],
//     '石嘴山':[106.39,39.04],
//     '沈阳':[123.38,41.8],
//     '苏州':[120.62,31.32],
//     '茂名':[110.88,21.68],
//     '嘉兴':[120.76,30.77],
//     '长春':[125.35,43.88],
//     '胶州':[120.03336,36.264622],
//     '银川':[106.27,38.47],
//     '张家港':[120.555821,31.875428],
//     '三门峡':[111.19,34.76],
//     '锦州':[121.15,41.13],
//     '南昌':[115.89,28.68],
//     '柳州':[109.4,24.33],
//     '三亚':[109.511909,18.252847],
//     '自贡':[104.778442,29.33903],
//     '吉林':[126.57,43.87],
//     '阳江':[111.95,21.85],
//     '泸州':[105.39,28.91],
//     '西宁':[101.74,36.56],
//     '宜宾':[104.56,29.77],
//     '呼和浩特':[111.65,40.82],
//     '成都':[104.06,30.67],
//     '大同':[113.3,40.12],
//     '镇江':[119.44,32.2],
//     '桂林':[110.28,25.29],
//     '张家界':[110.479191,29.117096],
//     '宜兴':[119.82,31.36],
//     '北海':[109.12,21.49],
//     '西安':[108.95,34.27],
//     '金坛':[119.56,31.74],
//     '东营':[118.49,37.46],
//     '牡丹江':[129.58,44.6],
//     '遵义':[106.9,27.7],
//     '绍兴':[120.58,30.01],
//     '扬州':[119.42,32.39],
//     '常州':[119.95,31.79],
//     '潍坊':[119.1,36.62],
//     '重庆':[106.54,29.59],
//     '台州':[121.420757,28.656386],
//     '南京':[118.78,32.04],
//     '滨州':[118.03,37.36],
//     '贵阳':[106.71,26.57],
//     '无锡':[120.29,31.59],
//     '本溪':[123.73,41.3],
//     '克拉玛依':[84.77,45.59],
//     '渭南':[109.5,34.52],
//     '马鞍山':[118.48,31.56],
//     '宝鸡':[107.15,34.38],
//     '焦作':[113.21,35.24],
//     '句容':[119.16,31.95],
//     '北京':[116.46,39.92],
//     '徐州':[117.2,34.26],
//     '衡水':[115.72,37.72],
//     '包头':[110,40.58],
//     '绵阳':[104.73,31.48],
//     '乌鲁木齐':[87.68,43.77],
//     '枣庄':[117.57,34.86],
//     '杭州':[120.19,30.26],
//     '淄博':[118.05,36.78],
//     '鞍山':[122.85,41.12],
//     '溧阳':[119.48,31.43],
//     '库尔勒':[86.06,41.68],
//     '安阳':[114.35,36.1],
//     '开封':[114.35,34.79],
//     '济南':[117,36.65],
//     '德阳':[104.37,31.13],
//     '温州':[120.65,28.01],
//     '九江':[115.97,29.71],
//     '邯郸':[114.47,36.6],
//     '临安':[119.72,30.23],
//     '兰州':[103.73,36.03],
//     '沧州':[116.83,38.33],
//     '临沂':[118.35,35.05],
//     '南充':[106.110698,30.837793],
//     '天津':[117.2,39.13],
//     '富阳':[119.95,30.07],
//     '泰安':[117.13,36.18],
//     '诸暨':[120.23,29.71],
//     '郑州':[113.65,34.76],
//     '哈尔滨':[126.63,45.75],
//     '聊城':[115.97,36.45],
//     '芜湖':[118.38,31.33],
//     '唐山':[118.02,39.63],
//     '平顶山':[113.29,33.75],
//     '邢台':[114.48,37.05],
//     '德州':[116.29,37.45],
//     '济宁':[116.59,35.38],
//     '荆州':[112.239741,30.335165],
//     '宜昌':[111.3,30.7],
//     '义乌':[120.06,29.32],
//     '丽水':[119.92,28.45],
//     '洛阳':[112.44,34.7],
//     '秦皇岛':[119.57,39.95],
//     '株洲':[113.16,27.83],
//     '石家庄':[114.48,38.03],
//     '莱芜':[117.67,36.19],
//     '常德':[111.69,29.05],
//     '保定':[115.48,38.85],
//     '湘潭':[112.91,27.87],
//     '金华':[119.64,29.12],
//     '岳阳':[113.09,29.37],
//     '长沙':[113,28.21],
//     '衢州':[118.88,28.97],
//     '廊坊':[116.7,39.53],
//     '菏泽':[115.480656,35.23375],
//     '合肥':[117.27,31.86],
//     '武汉':[114.31,30.52],
//     '大庆':[125.03,46.58]
// };
// var data = []

var geoCoordMap = {"六安市":[116.3123,31.8329],"安庆市":[116.7517,30.5255],"滁州市":[118.1909,32.536],"宣城市":[118.8062,30.6244],"阜阳市":[115.7629,32.9919],"宿州市":[117.5208,33.6841],"黄山市":[118.0481,29.9542],"巢湖市":[117.7734,31.4978],"亳州市":[116.1914,33.4698],"池州市":[117.3889,30.2014],"合肥市":[117.29,32.0581],"蚌埠市":[117.4109,33.1073],"芜湖市":[118.3557,31.0858],"淮北市":[116.6968,33.6896],"淮南市":[116.7847,32.7722],"马鞍山市":[118.6304,31.5363],"铜陵市":[117.9382,30.9375],"澳门":[113.5547,22.1484],"密云县":[117.0923,40.5121],"怀柔区":[116.6377,40.6219],"房山区":[115.8453,39.7163],"延庆县":[116.1543,40.5286],"门头沟区":[115.8,39.9957],"昌平区":[116.1777,40.2134],"大兴区":[116.4716,39.6352],"顺义区":[116.7242,40.1619],"平谷区":[117.1706,40.2052],"通州区":[116.7297,39.8131],"朝阳区":[116.4977,39.949],"海淀区":[116.2202,40.0239],"丰台区":[116.2683,39.8309],"石景山区":[116.1887,39.9346],"西城区":[116.3631,39.9353],"东城区":[116.418,39.9367],"宣武区":[116.3603,39.8852],"崇文区":[116.4166,39.8811],"新疆":[84.9023,41.748],"西藏":[88.7695,31.6846],"内蒙古":[117.5977,44.3408],"青海":[96.2402,35.4199],"四川":[102.9199,30.1904],"黑龙江":[128.1445,48.5156],"甘肃":[95.7129,40.166],"云南":[101.8652,25.1807],"广西":[108.2813,23.6426],"湖南":[111.5332,27.3779],"陕西":[109.5996,35.6396],"广东":[113.4668,22.8076],"吉林":[126.4746,43.5938],"河北":[115.4004,37.9688],"湖北":[112.2363,31.1572],"贵州":[106.6113,26.9385],"山东":[118.7402,36.4307],"江西":[116.0156,27.29],"河南":[113.4668,33.8818],"辽宁":[122.3438,41.0889],"山西":[112.4121,37.6611],"安徽":[117.2461,32.0361],"福建":[118.3008,25.9277],"浙江":[120.498,29.0918],"江苏":[120.0586,32.915],"重庆":[107.7539,30.1904],"宁夏":[105.9961,37.3096],"海南":[109.9512,19.2041],"台湾":[121.0295,23.6082],"北京":[116.4551,40.2539],"天津":[117.4219,39.4189],"上海":[121.4648,31.2891],"香港":[114.2784,22.3057],"酉阳土家族苗族自治县":[108.8196,28.8666],"奉节县":[109.3909,30.9265],"巫溪县":[109.3359,31.4813],"开县":[108.4131,31.2561],"彭水苗族土家族自治县":[108.2043,29.3994],"云阳县":[108.8306,31.0089],"万州区":[108.3911,30.6958],"城口县":[108.7756,31.9098],"江津区":[106.2158,28.9874],"石柱土家族自治县":[108.2813,30.1025],"巫山县":[109.8853,31.1188],"涪陵区":[107.3364,29.6796],"丰都县":[107.8418,29.9048],"武隆县":[107.655,29.35],"南川区":[107.1716,29.1302],"秀山土家族苗族自治县":[109.0173,28.5205],"黔江区":[108.7207,29.4708],"合川区":[106.3257,30.108],"綦江县":[106.6553,28.8171],"忠县":[107.8967,30.3223],"梁平县":[107.7429,30.6519],"巴南区":[106.7322,29.4214],"潼南县":[105.7764,30.1135],"永川区":[105.8643,29.2566],"垫江县":[107.4573,30.2454],"渝北区":[106.7212,29.8499],"长寿区":[107.1606,29.9762],"大足县":[105.7544,29.6136],"铜梁县":[106.0291,29.8059],"荣昌县":[105.5127,29.4708],"璧山县":[106.2048,29.5807],"北碚区":[106.5674,29.8883],"万盛区":[106.908,28.9325],"九龙坡区":[106.3586,29.4049],"沙坪坝区":[106.3696,29.6191],"南岸区":[106.6663,29.5367],"江北区":[106.8311,29.6191],"大渡口区":[106.4905,29.4214],"双桥区":[105.7874,29.4928],"渝中区":[106.5344,29.5477],"南平市":[118.136,27.2845],"三明市":[117.5317,26.3013],"龙岩市":[116.8066,25.2026],"宁德市":[119.6521,26.9824],"福州市":[119.4543,25.9222],"漳州市":[117.5757,24.3732],"泉州市":[118.3228,25.1147],"莆田市":[119.0918,25.3455],"厦门市":[118.1689,24.6478],"酒泉市":[96.2622,40.4517],"张掖市":[99.7998,38.7433],"甘南藏族自治州":[102.9199,34.6893],"武威市":[103.0188,38.1061],"陇南市":[105.304,33.5632],"庆阳市":[107.5342,36.2],"白银市":[104.8645,36.5076],"定西市":[104.5569,35.0848],"天水市":[105.6445,34.6289],"兰州市":[103.5901,36.3043],"平凉市":[107.0728,35.321],"临夏回族自治州":[103.2715,35.5737],"金昌市":[102.074,38.5126],"嘉峪关市":[98.1738,39.8035],"清远市":[112.9175,24.3292],"韶关市":[113.7964,24.7028],"湛江市":[110.3577,20.9894],"梅州市":[116.1255,24.1534],"河源市":[114.917,23.9722],"肇庆市":[112.1265,23.5822],"惠州市":[114.6204,23.1647],"茂名市":[111.0059,22.0221],"江门市":[112.6318,22.1484],"阳江市":[111.8298,22.0715],"云浮市":[111.7859,22.8516],"广州市":[113.5107,23.2196],"汕尾市":[115.5762,23.0438],"揭阳市":[116.1255,23.313],"珠海市":[113.7305,22.1155],"佛山市":[112.8955,23.1097],"潮州市":[116.7847,23.8293],"汕头市":[117.1692,23.3405],"深圳市":[114.5435,22.5439],"东莞市":[113.8953,22.901],"中山市":[113.4229,22.478],"百色市":[106.6003,23.9227],"河池市":[107.8638,24.5819],"桂林市":[110.5554,25.318],"南宁市":[108.479,23.1152],"柳州市":[109.3799,24.9774],"崇左市":[107.3364,22.4725],"来宾市":[109.7095,23.8403],"玉林市":[110.2148,22.3792],"梧州市":[110.9949,23.5052],"贺州市":[111.3135,24.4006],"钦州市":[109.0283,22.0935],"贵港市":[109.9402,23.3459],"防城港市":[108.0505,21.9287],"北海市":[109.314,21.6211],"遵义市":[106.908,28.1744],"黔东南苗族侗族自治州":[108.4241,26.4166],"毕节地区":[105.1611,27.0648],"黔南布依族苗族自治州":[107.2485,25.8398],"铜仁地区":[108.6218,28.0096],"黔西南布依族苗族自治州":[105.5347,25.3949],"六盘水市":[104.7546,26.0925],"安顺市":[105.9082,25.9882],"贵阳市":[106.6992,26.7682],"儋州市":[109.3291,19.5653],"文昌市":[110.8905,19.7823],"乐东黎族自治县":[109.0283,18.6301],"三亚市":[109.3716,18.3698],"琼中黎族苗族自治县":[109.8413,19.0736],"东方市":[108.8498,19.0414],"海口市":[110.3893,19.8516],"万宁市":[110.3137,18.8388],"澄迈县":[109.9937,19.7314],"白沙黎族自治县":[109.3703,19.211],"琼海市":[110.4208,19.224],"昌江黎族自治县":[109.0407,19.2137],"临高县":[109.6957,19.8063],"陵水黎族自治县":[109.9924,18.5415],"屯昌县":[110.0377,19.362],"定安县":[110.3384,19.4698],"保亭黎族苗族自治县":[109.6284,18.6108],"五指山市":[109.5282,18.8299],"黑河市":[127.1448,49.2957],"大兴安岭地区":[124.1016,52.2345],"哈尔滨市":[127.9688,45.368],"齐齐哈尔市":[124.541,47.5818],"牡丹江市":[129.7815,44.7089],"绥化市":[126.7163,46.8018],"伊春市":[129.1992,47.9608],"佳木斯市":[133.0005,47.5763],"鸡西市":[132.7917,45.7361],"双鸭山市":[133.5938,46.7523],"大庆市":[124.7717,46.4282],"鹤岗市":[130.4407,47.7081],"七台河市":[131.2756,45.9558],"承德市":[117.5757,41.4075],"张家口市":[115.1477,40.8527],"保定市":[115.0488,39.0948],"唐山市":[118.4766,39.6826],"沧州市":[116.8286,38.2104],"石家庄市":[114.4995,38.1006],"邢台市":[114.8071,37.2821],"邯郸市":[114.4775,36.535],"秦皇岛市":[119.2126,40.0232],"衡水市":[115.8838,37.7161],"廊坊市":[116.521,39.0509],"南阳市":[112.4011,33.0359],"信阳市":[114.8291,32.0197],"洛阳市":[112.0605,34.3158],"驻马店市":[114.1589,32.9041],"周口市":[114.873,33.6951],"商丘市":[115.741,34.2828],"三门峡市":[110.8301,34.3158],"新乡市":[114.2029,35.3595],"平顶山市":[112.9724,33.739],"郑州市":[113.4668,34.6234],"安阳市":[114.5325,36.0022],"开封市":[114.5764,34.6124],"焦作市":[112.8406,35.1508],"许昌市":[113.6975,34.0466],"濮阳市":[115.1917,35.799],"漯河市":[113.8733,33.6951],"鹤壁市":[114.3787,35.744],"怀化市":[109.9512,27.4438],"永州市":[111.709,25.752],"邵阳市":[110.9619,26.8121],"郴州市":[113.2361,25.8673],"常德市":[111.4014,29.2676],"湘西土家族苗族自治州":[109.7864,28.6743],"衡阳市":[112.4121,26.7902],"岳阳市":[113.2361,29.1357],"益阳市":[111.731,28.3832],"长沙市":[113.0823,28.2568],"株洲市":[113.5327,27.0319],"张家界市":[110.5115,29.328],"娄底市":[111.6431,27.7185],"湘潭市":[112.5439,27.7075],"盐城市":[120.2234,33.5577],"徐州市":[117.5208,34.3268],"南通市":[121.1023,32.1625],"淮安市":[118.927,33.4039],"苏州市":[120.6519,31.3989],"宿迁市":[118.5535,33.7775],"连云港市":[119.1248,34.552],"扬州市":[119.4653,32.8162],"南京市":[118.8062,31.9208],"泰州市":[120.0586,32.5525],"无锡市":[120.3442,31.5527],"常州市":[119.4543,31.5582],"镇江市":[119.4763,31.9702],"赣州市":[115.2795,25.8124],"吉安市":[114.884,26.9659],"上饶市":[117.8613,28.7292],"九江市":[115.4224,29.3774],"抚州市":[116.4441,27.4933],"宜春市":[115.0159,28.3228],"南昌市":[116.0046,28.6633],"景德镇市":[117.334,29.3225],"萍乡市":[113.9282,27.4823],"鹰潭市":[117.0813,28.2349],"新余市":[114.95,27.8174],"延边朝鲜族自治州":[129.397,43.2587],"吉林市":[126.8372,43.6047],"白城市":[123.0029,45.2637],"松原市":[124.0906,44.7198],"长春市":[125.8154,44.2584],"白山市":[127.2217,42.0941],"通化市":[125.9583,41.8579],"四平市":[124.541,43.4894],"辽源市":[125.343,42.7643],"大连市":[122.2229,39.4409],"朝阳市":[120.0696,41.4899],"丹东市":[124.541,40.4242],"铁岭市":[124.2773,42.7423],"沈阳市":[123.1238,42.1216],"抚顺市":[124.585,41.8579],"葫芦岛市":[120.1575,40.578],"阜新市":[122.0032,42.2699],"锦州市":[121.6626,41.4294],"鞍山市":[123.0798,40.6055],"本溪市":[124.1455,41.1987],"营口市":[122.4316,40.4297],"辽阳市":[123.4094,41.1383],"盘锦市":[121.9482,41.0449],"呼伦贝尔市":[120.8057,50.2185],"阿拉善盟":[102.019,40.1001],"锡林郭勒盟":[115.6421,44.176],"鄂尔多斯市":[108.9734,39.2487],"赤峰市":[118.6743,43.2642],"巴彦淖尔市":[107.5562,41.3196],"通辽市":[121.4758,43.9673],"乌兰察布市":[112.5769,41.77],"兴安盟":[121.3879,46.1426],"包头市":[110.3467,41.4899],"呼和浩特市":[111.4124,40.4901],"乌海市":[106.886,39.4739],"吴忠市":[106.853,37.3755],"中卫市":[105.4028,36.9525],"固原市":[106.1389,35.9363],"银川市":[106.3586,38.1775],"石嘴山市":[106.4795,39.0015],"海西蒙古族藏族自治州":[94.9768,37.1118],"玉树藏族自治州":[93.5925,33.9368],"果洛藏族自治州":[99.3823,34.0466],"海南藏族自治州":[100.3711,35.9418],"海北藏族自治州":[100.3711,37.9138],"黄南藏族自治州":[101.5686,35.1178],"海东地区":[102.3706,36.2988],"西宁市":[101.4038,36.8207],"崇明县":[121.5637,31.5383],"南汇区":[121.8755,30.954],"奉贤区":[121.5747,30.8475],"浦东新区":[121.6928,31.2561],"金山区":[121.2657,30.8112],"青浦区":[121.1751,31.1909],"松江区":[121.1984,31.0268],"嘉定区":[121.2437,31.3625],"宝山区":[121.4346,31.4051],"闵行区":[121.4992,31.0838],"杨浦区":[121.528,31.2966],"普陀区":[121.3879,31.2602],"徐汇区":[121.4333,31.1607],"长宁区":[121.3852,31.2115],"闸北区":[121.4511,31.2794],"虹口区":[121.4882,31.2788],"黄浦区":[121.4868,31.219],"卢湾区":[121.4758,31.2074],"静安区":[121.4484,31.2286],"榆林市":[109.8743,38.205],"延安市":[109.1052,36.4252],"汉中市":[106.886,33.0139],"安康市":[109.1162,32.7722],"商洛市":[109.8083,33.761],"宝鸡市":[107.1826,34.3433],"渭南市":[109.7864,35.0299],"咸阳市":[108.4131,34.8706],"西安市":[109.1162,34.2004],"铜川市":[109.0393,35.1947],"忻州市":[112.4561,38.8971],"吕梁市":[111.3574,37.7325],"临汾市":[111.4783,36.1615],"晋中市":[112.7747,37.37],"运城市":[111.1487,35.2002],"大同市":[113.7854,39.8035],"长治市":[112.8625,36.4746],"朔州市":[113.0713,39.6991],"晋城市":[112.7856,35.6342],"太原市":[112.3352,37.9413],"阳泉市":[113.4778,38.0951],"甘孜藏族自治州":[99.9207,31.0803],"阿坝藏族羌族自治州":[102.4805,32.4536],"凉山彝族自治州":[101.9641,27.6746],"绵阳市":[104.7327,31.8713],"达州市":[107.6111,31.333],"广元市":[105.6885,32.2284],"雅安市":[102.6672,29.8938],"宜宾市":[104.6558,28.548],"乐山市":[103.5791,29.1742],"南充市":[106.2048,31.1517],"巴中市":[107.0618,31.9977],"泸州市":[105.4578,28.493],"成都市":[103.9526,30.7617],"资阳市":[104.9744,30.1575],"攀枝花市":[101.6895,26.7133],"眉山市":[103.8098,30.0146],"广安市":[106.6333,30.4376],"德阳市":[104.48,31.1133],"内江市":[104.8535,29.6136],"遂宁市":[105.5347,30.6683],"自贡市":[104.6667,29.2786],"蓟县":[117.4672,40.004],"武清区":[117.0621,39.4121],"宝坻区":[117.4274,39.5913],"静海县":[116.9824,38.8312],"宁河县":[117.6801,39.3853],"大港区":[117.3875,38.757],"塘沽区":[117.6801,38.9987],"西青区":[117.1829,39.0022],"北辰区":[117.1761,39.2548],"东丽区":[117.4013,39.1223],"汉沽区":[117.8888,39.2191],"津南区":[117.3958,38.9603],"河西区":[117.2365,39.0804],"河东区":[117.2571,39.1209],"南开区":[117.1527,39.1065],"河北区":[117.2145,39.1615],"红桥区":[117.1596,39.1663],"和平区":[117.2008,39.1189],"巴音郭楞蒙古自治州":[88.1653,39.6002],"和田地区":[81.167,36.9855],"哈密地区":[93.7793,42.9236],"阿克苏地区":[82.9797,41.0229],"阿勒泰地区":[88.2971,47.0929],"喀什地区":[77.168,37.8534],"塔城地区":[86.6272,45.8514],"昌吉回族自治州":[89.6814,44.4507],"克孜勒苏柯尔克孜自治州":[74.6301,39.5233],"吐鲁番地区":[89.6375,42.4127],"伊犁哈萨克自治州":[82.5513,43.5498],"博尔塔拉蒙古自治州":[81.8481,44.6979],"乌鲁木齐市":[87.9236,43.5883],"克拉玛依市":[85.2869,45.5054],"阿拉尔市":[81.2769,40.6549],"图木舒克市":[79.1345,39.8749],"五家渠市":[87.5391,44.3024],"石河子市":[86.0229,44.2914],"那曲地区":[88.1982,33.3215],"阿里地区":[82.3645,32.7667],"日喀则地区":[86.2427,29.5093],"林芝地区":[95.4602,29.1138],"昌都地区":[97.0203,30.7068],"山南地区":[92.2083,28.3392],"拉萨市":[91.1865,30.1465],"普洱市":[100.7446,23.4229],"红河哈尼族彝族自治州":[103.0408,23.6041],"文山壮族苗族自治州":[104.8865,23.5712],"曲靖市":[103.9417,25.7025],"楚雄彝族自治州":[101.6016,25.3619],"大理白族自治州":[99.9536,25.6805],"临沧市":[99.613,24.0546],"迪庆藏族自治州":[99.4592,27.9327],"昭通市":[104.0955,27.6031],"昆明市":[102.9199,25.4663],"丽江市":[100.448,26.955],"西双版纳傣族自治州":[100.8984,21.8628],"保山市":[99.0637,24.9884],"玉溪市":[101.9312,23.8898],"怒江傈僳族自治州":[99.1516,26.5594],"德宏傣族景颇族自治州":[98.1299,24.5874],"丽水市":[119.5642,28.1854],"杭州市":[119.5313,29.8773],"温州市":[120.498,27.8119],"宁波市":[121.5967,29.6466],"舟山市":[122.2559,30.2234],"台州市":[121.1353,28.6688],"金华市":[120.0037,29.1028],"衢州市":[118.6853,28.8666],"绍兴市":[120.564,29.7565],"嘉兴市":[120.9155,30.6354],"湖州市":[119.8608,30.7782],"烟台市":[120.7397,37.5128],"临沂市":[118.3118,35.2936],"潍坊市":[119.0918,36.524],"青岛市":[120.4651,36.3373],"菏泽市":[115.6201,35.2057],"济宁市":[116.8286,35.3375],"德州市":[116.6858,37.2107],"滨州市":[117.8174,37.4963],"聊城市":[115.9167,36.4032],"东营市":[118.7073,37.5513],"济南市":[117.1582,36.8701],"泰安市":[117.0264,36.0516],"威海市":[121.9482,37.1393],"日照市":[119.2786,35.5023],"淄博市":[118.0371,36.6064],"枣庄市":[117.323,34.8926],"莱芜市":[117.6526,36.2714],"恩施土家族苗族自治州":[109.5007,30.2563],"十堰市":[110.5115,32.3877],"宜昌市":[111.1707,30.7617],"襄樊市":[111.9397,31.9263],"黄冈市":[115.2686,30.6628],"荆州市":[113.291,30.0092],"荆门市":[112.6758,30.9979],"咸宁市":[114.2578,29.6631],"随州市":[113.4338,31.8768],"孝感市":[113.9502,31.1188],"武汉市":[114.3896,30.6628],"黄石市":[115.0159,29.9213],"神农架林区":[110.4565,31.5802],"天门市":[113.0273,30.6409],"仙桃市":[113.3789,30.3003],"潜江市":[112.7637,30.3607],"鄂州市":[114.7302,30.4102]}
// var convertData = function (data) {
//     var res = [];
//     for (var i = 0; i < data.length; i++) {
//         var geoCoord = geoCoordMap[data[i].name];
//         if (geoCoord) {
//             res.push({
//                 name: data[i].name,
//                 value: geoCoord.concat(data[i].value)
//             });
//         }
//     }
//     return res;
// };

option = {
   // backgroundColor: '#404a59',
    title: {
        text: '实时物流数据',
        // subtext: '来源：big-data-view',
        // sublink: 'https://gitee.com/iGaoWei/big-data-view',
        left: 'center',
        textStyle: {
            color: '#fff'
        }
    },
    tooltip : {
        trigger: 'item',
		formatter: function (params) {
              if(typeof(params.value)[2] == "undefined"){
              	return params.name + ' : ' + params.value;
              }else{
              	return params.name + ' : ' + params.value[2];
              }
            }
    },
  
    geo: {
        map: 'china',
        label: {
            emphasis: {
                show: true ,     //显示省份名称
                textStyle: {
                    color:'#fff'
                }
            }
        },
        roam: false,//禁止其放大缩小
        itemStyle: {
            normal: {
                areaColor: '#4c60ff',
                borderColor: '#002097'
            },
            emphasis: {
                areaColor: '#293fff'
            }
        }
    },
    series : [
        {
            name: '消费金额',
            type: 'scatter',
            coordinateSystem: 'geo',
            // data: ,
            symbolSize: function (val) {
                return val[2] / 15;
            },
            label: {
                normal: {
                    formatter: '{b}',
                    position: 'right',
                    show: false
                },
                emphasis: {
                    show: true
                }
            },
            itemStyle: {
                normal: {
                    color: '#ffeb7b'
                }
            }
        }
		
		/**
		,
        {
            name: 'Top 5',
            type: 'effectScatter',
            coordinateSystem: 'geo',
            data: convertData(data.sort(function (a, b) {
                return b.value - a.value;
            }).slice(0, 6)),
            symbolSize: function (val) {
                return val[2] / 20;
            },
            showEffectOn: 'render',
            rippleEffect: {
                brushType: 'stroke'
            },
            hoverAnimation: true,
            label: {
                normal: {
                    formatter: '{b}',
                    position: 'right',
                    show: true
                }
            },
            itemStyle: {
                normal: {
                    color: '#ffd800',
                    shadowBlur: 10,
                    shadowColor: 'rgba(0,0,0,.3)'
                }
            },
            zlevel: 1
        }
		**/
    ]
};
        setInterval(function () {
            $.getJSON("http://localhost:8080/covid/getCovidMapdata", function (data) {
                var data = data.data
                var convertData = function (data) {
                    var res = [];
                    for (var i = 0; i < data.length; i++) {
                        var geoCoord = geoCoordMap[data[i].name];
                        if (geoCoord) {
                            res.push({
                                name: data[i].name,
                                value: geoCoord.concat(data[i].value)
                            });
                        }
                    }
                    return res;
                };
                myChart.setOption({
                    series: [{
                        data: convertData(data)
                    }]

                })
            }, 2000);
        },5000)
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }

})

